package com.nuit.cxl.springboottest.controller;


import com.nuit.cxl.springboottest.MyJdbc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BiliController {

    @Value("${my-jdbc.driver}")
    private String driver;

    @Autowired
    private MyJdbc myJdbc;

    @Autowired
    private Environment environment;

    @RequestMapping("/bili")
    public String bili() {

        System.out.println(driver);
        System.out.println(myJdbc);
        System.out.println(environment.getProperty("my-jdbc.arrays[0]"));
        return "Bili Controller";
    }
}
